<?php

/**
 * @file
 * Default simple view template to all the fields as a row.
 *
 * - $view: The view in use.
 * - $fields: an array of $field objects. Each one contains:
 *   - $field->content: The output of the field.
 *   - $field->raw: The raw data for the field, if it exists. This is NOT output safe.
 *   - $field->class: The safe class id to use.
 *   - $field->handler: The Views field handler object controlling this field. Do not use
 *     var_export to dump this object, as it can't handle the recursion.
 *   - $field->inline: Whether or not the field should be inline.
 *   - $field->inline_html: either div or span based on the above flag.
 *   - $field->wrapper_prefix: A complete wrapper containing the inline_html to use.
 *   - $field->wrapper_suffix: The closing tag for the wrapper.
 *   - $field->separator: an optional separator that may appear before a field.
 *   - $field->label: The wrap label text to use.
 *   - $field->label_html: The full HTML of the label to use including
 *     configured element type.
 * - $row: The raw result object from the query, with all data it fetched.
 *
 * @ingroup views_templates
 */
?>
<article class=" post type-post status-publish format-standard has-post-thumbnail hentry category-uncategorized tag-multipurpose  blog-article grid normal">
    <?php if(isset($fields['field_blog_thumbnail'])): print $fields['field_blog_thumbnail']->content; endif?>
    <div class="content post_format_standart">
        <?php if(isset($fields['title'])): print $fields['title']->content; endif?>
        <?php if(isset($fields['field_blog_category'])): print $fields['field_blog_category']->content; endif?>
        <ul class="info">
            <li><i class="moon-calendar"></i><?php print format_date($row->node_created, 'custom', 'j M');?></li>
            <li><i class="moon-user-3"></i><?php print $row->_field_data['nid']['entity']->name;?></li>
            <li><i class="moon-bubble"></i><?php print $row->_field_data['nid']['entity']->comment_count;?> Comments</li>
        </ul>
        <div class="blog-content">
            <?php print $row->field_body[0]['raw']['value'];?> <a href="<?php print drupal_get_path_alias('node/').$row->nid;?>" class="readm">Read More</a>
        </div>
    </div>
</article>
<?php unset($fields['title']);?>
<?php unset($fields['field_blog_thumbnail']);?>
<?php unset($fields['body']);?>
<?php unset($fields['field_blog_category']);?>
<?php foreach ($fields as $id => $field): ?>
    <?php if (!empty($field->separator)): ?>
        <?php print $field->separator; ?>
    <?php endif; ?>
    <?php print $field->wrapper_prefix; ?>
    <?php print $field->label_html; ?>
    <?php print $field->content; ?>
    <?php print $field->wrapper_suffix; ?>
<?php endforeach; ?>